﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.DateTime?>" %>
<%
 ModelMetadata meta = ViewData.ModelMetadata;
 string propertyName = meta.PropertyName;
 %>

  <%= Html.Telerik().DatePicker()
                  .Name("DatePicker" + propertyName)
                        .HtmlAttributes(new { id = "DatePicker" + propertyName + "_wrapper" })
                        //.Min("1/1/1900")
                        //.Max("5/15/2011")
            .ShowButton(true)
            .Value(Model)
            .OpenOnFocus(true)
    %>